package com.cdu.ai_intelligent_teaching_and_training_system.mapper;

import com.cdu.ai_intelligent_teaching_and_training_system.entity.Feedback;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FeedbackMapper {
    
    // 插入反馈
    int insert(Feedback feedback);
    
    // 根据ID查询反馈
    Feedback selectById(@Param("feedbackId") Long feedbackId);
    
    // 根据学生ID查询反馈
    List<Feedback> selectByStudentId(@Param("studentId") Long studentId);
    
    // 根据课程ID查询反馈
    List<Feedback> selectByCourseId(@Param("courseId") Long courseId);
    
    // 查询所有反馈
    List<Feedback> selectAll();
    
    // 更新反馈
    int update(Feedback feedback);
    
    // 删除反馈
    int deleteById(@Param("feedbackId") Long feedbackId);
}
